home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-24 | 1.5 KB | 53 lines | [TEXT/KAHL] |
- /******************************************************************************
- CAMBorder.c
-
- Creates a simple pane with a border.
- Functional equivalent of the CBorder class. It replaces CBorder
- so that none of the TCL compatibility classes will be needed.
-
- SUPERCLASS = CPane
-
- Copyright © 1991 Bowers Development Corporation. All rights reserved.
-
- ******************************************************************************/
-
- #include "CAMBorder.h"
- #include <CPaneBorder.h>
-
- /******************************************************************************
- IViewTemp (OVERRIDE)
-
- Initialize a Border object using a template
- ******************************************************************************/
-
- void CAMBorder::IViewTemp (CView *anEnclosure,
- CBureaucrat *aSupervisor,
- Ptr viewData)
- {
- BorderTempP p;
- short thickness;
- short dropShadow;
- CPaneBorder *border;
- Rect margin;
-
- p = (BorderTempP) viewData;
-
- inherited::IViewTemp (anEnclosure, aSupervisor, (Ptr) &p->sPaneTemp);
-
- thickness = p->thickness;
- dropShadow = p->dropShadow;
-
- border = new CPaneBorder;
- border->IPaneBorder (kBorderFrame);
- SetRect (&margin, thickness, thickness, -thickness, -thickness);
- /* A pane border draws outside its pane. We want it */
- /* to draw inside the pane so we inset its margin. */
- border->SetMargin (&margin);
- border->SetPenSize (thickness, thickness);
- border->SetShadow (dropShadow, dropShadow, dropShadow, dropShadow);
- SetBorder (border);
-
- } /* IViewTemp */
-
- /* CAMButton */
-